<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/finance/zccb/yjy_whole_cost_template.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/finance/zccb/yjy_whole_cost_template.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'yjy_whole_cost_template_id',
                footer: "Foots",
                cnName: '整车成本模板表',
                name: 'zccb/yjy_whole_cost_template',
                url: "/yjy_whole_cost_template/",
                sortName: "CreateDate"
            });
            const editFormFields = ref({});
            const editFormOptions = ref([]);
            const searchFormFields = ref({"type":"","describe":""});
            const searchFormOptions = ref([[{"dataKey":"整车成本模板类型","data":[],"title":"模板类型","field":"type","type":"select"},{"title":"模板描述","field":"describe","type":"like"}]]);
            const columns = ref([{field:'yjy_whole_cost_template_id',title:'研究院整车成本模板表id',type:'guid',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'type',title:'模板类型',type:'int',bind:{ key:'整车成本模板类型',data:[]},width:110,align:'left',sort:true},
                       {field:'unique_value',title:'模板层级对应唯一值',type:'string',width:220,align:'left'},
                       {field:'serial_number',title:'序号',type:'int',width:110,align:'left'},
                       {field:'level',title:'模板层级',type:'int',width:110,align:'left'},
                       {field:'describe',title:'模板描述',type:'string',width:220,align:'left'},
                       {field:'Creator',title:'创建人名称',type:'string',width:130,align:'left'},
                       {field:'CreateDate',title:'创建时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'Modifier',title:'修改人名称',type:'string',width:130,align:'left'},
                       {field:'ModifyDate',title:'修改时间',type:'datetime',width:150,align:'left',sort:true}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
